Conversation
There was a problem hiding this comment.
I think (since this is like a demo format), all properties should be duly documented (for OAS).
| public int $code; | ||
|
|
||
| #[FPost(new VMixed())] | ||
| public mixed $payload; |
There was a problem hiding this comment.
The properties should be properly documented (described) for OAS.
|
I added descriptions to the formats (please check, some are really surface level because I could not infer much from the code). I also added a new feature, where Format classes can be used for validation even in loose attributes: #[Query(
"filters",
new VObject(UserFilterFormat::class),
"Named filters that prune the result.",
required: false,
nullable: true,
)]
public function actionDefault(Although annotating key-value stores in URL parameters with |
| public array $students; | ||
|
|
||
| #[FPost(new VUuid(), required: false)] | ||
| #[FPost(new VUuid(), "The instance ID of the group", required: false)] |
There was a problem hiding this comment.
ID of an instance in which the group belongs.
| public string $instanceId; | ||
|
|
||
| #[FPost(new VBool())] | ||
| #[FPost(new VBool(), "Whether the group has a valid license")] |
There was a problem hiding this comment.
Whether the instance where the group belongs has a valid license.
| public array $shadowAssignments; | ||
|
|
||
| #[FPost(new VBool())] | ||
| #[FPost(new VBool(), "Whether the group statistics are public")] |
There was a problem hiding this comment.
Whether the student's results are visible to other students.
| public bool $publicStats; | ||
|
|
||
| #[FPost(new VBool())] | ||
| #[FPost(new VBool(), "Whether the group is detaining")] |
There was a problem hiding this comment.
Whether the group detains the students (so they can be released only by the teacher).
| public bool $detaining; | ||
|
|
||
| #[FPost(new VDouble(), required: false)] | ||
| #[FPost(new VDouble(), "The group assignment point threshold", required: false)] |
There was a problem hiding this comment.
A relative number of points a student must receive from assignments to fulfill the requirements of the group.
| public ?float $threshold; | ||
|
|
||
| #[FPost(new VInt(), required: false)] | ||
| #[FPost(new VInt(), "The group points limit", required: false)] |
There was a problem hiding this comment.
A minimal number of points that a student must receive to fulfill the group's requirements.
| public array $bindings; | ||
|
|
||
| #[FPost(new VTimestamp(), required: false)] | ||
| #[FPost(new VTimestamp(), "The time when the exam starts if there is an exam", required: false)] |
| public ?int $examBegin; | ||
|
|
||
| #[FPost(new VTimestamp(), required: false)] | ||
| #[FPost(new VTimestamp(), "The time when the exam ends if there is an exam", required: false)] |
| public ?int $examEnd; | ||
|
|
||
| #[FPost(new VBool(), required: false)] | ||
| #[FPost(new VBool(), "Whether there is a strict exam lock", required: false)] |
There was a problem hiding this comment.
Whether the scheduled exam requires a strict access lock.
| public ?bool $examLockStrict; | ||
|
|
||
| #[FPost(new VArray())] | ||
| #[FPost(new VArray(), "All group exams")] |
There was a problem hiding this comment.
All past exams (with at least one student locked).
This PR adds response Formats.
Action methods can be annotated with the
ResponseFormatattribute that link them to a Format class similarly to how theFormatattribute works.Response Formats are only used for swagger generation to detail each response of the endpoint.
The
GroupFormatclass was added with a nestedGroupPrivateDataFormatthat was used on manyGroupsPresenterendpoints.Additionally, the PR adds a performance improvement to the
BasePresenterthat memoizes loose attributes.